import { getQueryString } from '@/util/util.js';
import { MessageBox,Toast } from 'mint-ui';
export default {
  name: "",
  data: () => ({

  }),
  mounted() {
    let that = this;
    let transaction_id = getQueryString('transaction_id');  //交易号
    let timestamp = getQueryString('timestamp');  //请求时间
    let result_code = getQueryString('result_code');  //签约结果代码
    let download_url = getQueryString('download_url');  //下载地址
    let viewpdf_url = getQueryString('viewpdf_url');    //查看地址
    let msg_digest = getQueryString('msg_digest');      //摘要

    // let code = getQueryString('code');      //code
    //
    // if (code==500) {
    //   let message = getQueryString('code');      //信息提示
    //   Toast(message);
    //   that.$router.go(-3);
    // }else if (code==200) {

    let contactInfo = {
      transaction_id:transaction_id,
      timestamp:timestamp,
      result_code:result_code,
      download_url:download_url,
      viewpdf_url:viewpdf_url,
      msg_digest:msg_digest
    }
    window.localStorage.setItem('contactInfo',JSON.stringify(contactInfo));
    MessageBox.alert('恭喜你签约成功，快去个人中心查看吧^-^').then(action=>{
      that.$router.push({
        path:'/members'
      });
    });

  // }
    // setTimeout(function () {
    //   that.$router.push({
    //     path:'/members'
    //   })
    // })
  }
}
